package com.czollmann.android.activities;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.KeyEvent;
import android.widget.TabHost;

import com.czollmann.android.R;
import com.czollmann.android.utils.LogUtils;

public class SettingsActivity extends TabActivity {
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.settings);
    Resources res = getResources();
    TabHost tabHost = getTabHost();
    TabHost.TabSpec spec;
    Intent intent;
    intent = new Intent().setClass(this, SettingsLimitActivity.class);
    spec = tabHost.newTabSpec("limit")
                  .setIndicator(getString(R.string.settings_group_limit),
                                res.getDrawable(R.drawable.ic_tab_limit))
                  .setContent(intent);
    tabHost.addTab(spec);
    intent = new Intent().setClass(this, SettingsDisplayActivity.class);
    spec = tabHost.newTabSpec("display")
                  .setIndicator(getString(R.string.settings_group_display),
                                res.getDrawable(R.drawable.ic_tab_display))
                  .setContent(intent);
    tabHost.addTab(spec);
    tabHost.setCurrentTab(0);
  }
}
